<?php
/**
 * @copyright	Copyright (C) 2009-2011 ACYBA SARL - All rights reserved.
 * @license		http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
 */
defined('_JEXEC') or die('Restricted access');
?>
<?php
$app =& JFactory::getApplication();
$templateDir = JURI::base() . 'templates/' . $app->getTemplate();
$jsPath = $templateDir. '/js/';
?>
<!--<script type="text/javascript" src="<?php echo $jsPath;?>jquery-1.3.2.js"></script>-->
<script type="text/javascript">
/*$(document).ready(function(){
	$('.newsletter_email').each(function() {
		var default_value = this.value;	
		$(this).focus(function() {
		if(this.value == default_value) {
		this.value = '';
		}
		});
		$(this).blur(function() {
		if(this.value == '') {
		this.value = default_value;
		}
		});
	});					   
});*/
</script>
<div class="newsletterBox">
    <h6>NEWSLETTER SIGNUP!</h6>
        <form id="<?php echo $formName; ?>" action="<?php echo JRoute::_('index.php'); ?>" onsubmit="return submitacymailingform('optin','<?php echo $formName;?>')" method="post" name="<?php echo $formName ?>">
        <?php foreach($fieldsToDisplay as $oneField) : ?>
        	<?php if($oneField == 'email') : ?>
				<input id="user_email_<?php echo $formName; ?>" onfocus="if(this.value == 'your email address here' || this.value == 'youremailaddresshere') this.value = ''" onblur="if(this.value == '') this.value = 'your email address here'"  class="newsletter_email" type="text" name="user[email]" value="your email address here" />
            <?php endif; ?>
        <?php endforeach; ?>
            <input name="" type="submit" class="submitBtn" value="" />
            
            <input type="hidden" name="ctrl" value="sub"/>
			<input type="hidden" name="task" value="notask"/>
			<input type="hidden" name="redirect" value="<?php echo urlencode($redirectUrl); ?>"/>
			<input type="hidden" name="redirectunsub" value="<?php echo urlencode($redirectUrlUnsub); ?>"/>
			<input type="hidden" name="option" value="<?php echo ACYMAILING_COMPONENT ?>"/>
			<input type="hidden" name="hiddenlists" value="<?php echo $hiddenLists;?>"/>
			<input type="hidden" name="acyformname" value="<?php echo $formName; ?>" />
			
        </form>
</div>